<template>

<div class="baseInfo">
	<div class="overview">
		<div class="row game-row one">
        	<div class="col-xs-7 no-padding header">
        		<div class='guli-header'> 
        		  <img class="user-icon" :src="base.userHead" @click="toPersonDetail">
        		</div>
            	<div class="detail">
                	<div class="nickname"  v-text="base.nickname"></div>
                	<div class="rank" v-text="'当前排名：' + (base.ranknum <= 0?'--':base.ranknum)"></div>
           	 	</div>
        	</div>

        	<div class="col-xs-5 gross-rate no-padding">
        		<div class='rate'>
        			<div class="ratename">累计收益率</div>
            	    <div v-bind:class="{'nocolor-value': base.isNone, 'red-value': base.isRed,'green-value':base.isGreen, 'rateline': true}" v-text="base.total_profitrate+'%'"></div>
        		</div>
        		<div class='rate'>
        			<div class="ratename">持仓盈亏率</div>
            	    <div v-bind:class='holdRate' v-text="base.income_balance+'%'"></div>
        		</div>
            </div>
   	 	</div>
   	 	
   	 	<div class='greyline'></div>

    	<div class="row game-row two">
        	<div class="part-one">
             	<div class="no-padding">
                 	<div class="total-assets">
                     	<div class="key">周涨幅率</div>
                     	<div class="value" v-text="week_increaserate || '-'"></div>
                	</div>
                	<div class="total-assets">
                    	<div class="key">总资产</div>
                    	<div class="value" v-text="base.total_balance"></div>
                 	</div>
                 	<div class="total-assets">
                    	<div class="key">初始资产</div>
                    	<div class="value" v-text="base.initmoney"></div>
                 	</div>
             	</div>
         	</div>


        	<div class="part-two">
            	<div class="no-padding">
                	<div class="total-assets">
                    	<div class="key">现金</div>
                    	<div class="value" v-text="base.avail_balance"></div>
                	</div>
                	<div class="total-assets">
                    	<div class="key">最大回撤</div>
                    	<div class="value" v-text="max_drawdown || '-'"></div>
                	</div>
                	<div class="total-assets">
                    	<div class="key">周收益率</div>
                    	<div class="value" v-text="week_profit || '-'"></div>
                	</div>
           		</div>
        	</div>

      	</div>
   </div>

    <div class="g-headline">
        <span></span>当前持仓<span class="position-head">仓位：<span class="position-value" v-text="base.position+'%'"></span></span>
	</div>
	<div class="grey-line-long"></div>

</div>


</template>

<script>
import baseInfoMixin from './mixins/baseInfoMixin'
export default {
  name: 'baseInfo',
  mixins: [baseInfoMixin]  	
}
</script>

<style style lang="less" scoped>
@basePicUrl: '../../../assets/images';
.baseInfo{
    background-color: #fff;
    width:100%;
}
.game-row{
    margin-top:-7px !important;
    padding: 10px 15px 13px 15px;
    font-size: 12px;
}
.game-row .part-one{
	padding: 0 10px 0 10px;
}
.two, .two .total-assets{
	display:flex;
}
.two .part-one, .two .part-two{
	flex:1;
}
.two .grey-line{
    width:1px;
    height:30px;
    background-color:#B9EBFF;
}
.two .value{
	flex:2;
    font-size:14px;
    color:#e6562a;
}
.two .key{
	flex:1;
    color:#674513;
}
 .three{
    margin-top:8px !important;
}
 .overview .nickname{
    font-size:17px;
}
 .overview .gross-rate{
    font-size:14px;
    margin-top:10px;
}
 .overview{
    background-repeat: no-repeat;
    background-size: cover;
    background-image: url('@{basePicUrl}/team/wulin/self-detaill-bg.jpg');
    color:#565656;
}
 .overview .header{
 	display:flex;
 	align-items:baseline;
 }
 .overview .rank{
    font-size:1.2rem;
    color:#e65223;
    margin-left:3px;
}
 .overview .detail{
 	flex:1.6;
    margin-left:10px;
    max-width:65%;
}
 .add-positive span:first-child{
    background-color: #ff4f4f;
    color: #ffffff;
    border-radius: 10px;
    font-size: 10px;
    display: inline-block;
    padding: 0 3px;
    margin-right: 2px;
}
.add-negative span:first-child{
    background-color: #98E466;
    color: #ffffff;
    border-radius: 10px;
    font-size: 10px;
    display: inline-block;
    padding: 0 4px;
    margin-right: 2px;
}
.g-headline{
    padding:10px 20px 7px 20px;
    color:#565656;
    font-size:1.6rem;
    background-image: url('@{basePicUrl}/team/wulin/self-detail-pos-bg.jpg');
    background-repeat: no-repeat;
    background-size: cover;
}
.g-headline  > span:first-child{
    border-left: 3px solid #F7743A;
    display: inline-block;
    height: 13px;
    margin-right:5px;
}
 .nocolor-value{
    font-size:1.2rem;
    color:#fff;
}
 .red-value{
    color:#FF3333;
    background-color: #fff;
    font-size:1.8rem;
    border-radius: 25px;
    margin-top: 5px;
}
 .green-value{
    color:#89CD4C;
    background-color: #FFECE4;
    font-size:1.8rem;
    border-radius: 25px;
    margin-top: 5px;
}
 .user-icon{
    max-width:50px;
    border-radius: 50%;
    margin: 19px 0 0 16px;
}
a:active{text-decoration:none;}
 .game-error{
    text-align: center;
    font-size: 15px;
    margin-top:20px;
}
.col-record a,.col-buy a{
    text-decoration: none;
}
.position-head{
    float:right;
}
.position-value{
    color:#F7743A;
}
.grey-line-long{
    width:100%;
    height:0.8px;
    background-color: #E7E7E7;
}
.rate{
	display:flex;
	align-items:baseline;
	margin-top:4px;
}
.rate .ratename{
	font-size: 1.2rem;
	flex:1;
}
.rate .rateline{
	width:73px;
	font-size: 14px;
	text-align: center;
	font-weight: bold;
	flex:1.2;
}
.greyline{
	width:100%;
	height:0.5px;
	background-color: RGBA(135,33,0,0.3);
	margin:3px 0 8px 0;
}
.guli-header{
	flex:1;
	width:75px;
	height:75px;
	background-image: url('@{basePicUrl}/team/wulin/self-detail-header.png');
	background-size:75px 75px;
}
</style>
